<style type="text/css">
.dz-error-message span * {font-size: 12px !important;}
</style>

<div class="top-sec">
    <form id="upload-form" action="{:U('Signimage/upload', array('questionnaire_id'=>$questionnaire_id))}" class="dropzone">
        <button id="uploadBtn" class="btn btn-success"> 确 认 上 传 </button>
    </form>
    
    <div id="signimage-info">
        <div>
            <p>该问卷已上传 <strong>{$totalNum}</strong> 张签名图</p>
            <p>其中 <strong>{$activeNum}</strong> 张启用状态</p>
        </div>
    </div>
</div>

<form id="signimage-list-form" action="{:U('Signimage/delete')}" method="post">
    <div class="table-tools">
        <button type="submit" class="btn btn-primary" title="删除勾选的图片"><i class="glyphicon glyphicon-remove"></i> 删 除 </button>
        <button id="updateStatusBtn" type="button" class="btn btn-success" title="重新设定图片启用状态" onclick="sortQuestions()"><i class="fa fa-copy"></i> 重 设 </button>
        <p>签名图列表</p>
    </div>

    <table id="signimage-table" class="table table-striped table-hover table-condensed datatable">
        <thead>
            <tr>
                <th>序号</th>
                <th>图片</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <volist name="signimages" id="image">
                <tr>
                    <td>{$i} <input name='id[]' type="checkbox" value="{$image.id}" /></td>
                    <td class="signimage-thumb"><image src="{$image.path}" /></td>
                    <td>
                        <switch name="image.status">
                            <case value="on"> <label class="switch switch-small"><input name='status[{$image.id}]' type="checkbox" checked value="on"/><span></span></label> </case>
                            <case value="off"> <label class="switch switch-small"><input name='status[{$image.id}]' type="checkbox" value="off"/><span></span></label> </case>
                        </switch>
                    </td>
                    <td>
                        <a href="{:U('Signimage/delete', array('id'=>$image['id']))}" class="btn btn-danger btn-rounded btn-condensed btn-sm" title="删除问卷"><span class="fa fa-times"></span></a>
                    </td>
                </tr>
            </volist>
        </tbody>
    </table>
</form>